type TupleToObject<T extends readonly (string | number | symbol)[]> = {
    [p in T[number]]:p;
}




//js
function tupleToObject(array){
    let obj = {}
    array.forEach((val )=>{
        obj[val] = val
    })
    return obj 
}